package org.seanye.erp.view.actions;

import org.eclipse.jface.viewers.TableViewer;
import org.seanye.erp.NLSTO;
import org.seanye.erp.view.model.Store;

public class AddPrivWeekAction extends AbstractAction {

    public AddPrivWeekAction(TableViewer viewer, Store store) {
	super(viewer, store);
	setText(NLSTO.Command_Add_Prev);
    }

    @Override
    public void runInViewer() {
	getStore().privWeekStore(getCurrentStore());
    }
    
    @Override
    public boolean isEnabled() {
	return getStore().isPrivWeekValid(getCurrentStore());
    }
}
